import React from 'react';
import ReactDOM from 'react-dom';

import './index.scss';

//基础jsx
let style = {
	color:'r' + 'ed'
}
let jsx = <div className="jsx" style={style}>jsx...</div>;


let names = ['hhhh','aaa','bbbb'];
let name = 'jackie';
let flag = false;
let jsx = (
	<div >
	    {/*条件判断*/}
		{
			flag ? <p>I am {name}</p> : <p>I am not {name}</p>
		}
	{/*数组循环*/}
        {
        	names.map((name,index) => <p key={index}>Hello, I am {name}</p>)
        }
	</div>
	);

ReactDOM.render(jsx,document.getElementById('app'));